package com.guanyong.services;

import com.guanyong.dao.IMaoyanHuaxiangDaoMapper;
import com.guanyong.dao.IMaoyanMovieCelebrityMapper;
import com.guanyong.dao.IMaoyanMovieCompanyMapper;
import com.guanyong.dao.IMaoyanMovieDaoMapper;
import com.guanyong.model.MaoYanHuaXiangModel;
import com.guanyong.model.MaoyanCelebrityModel;
import com.guanyong.model.MaoyanCompanyModel;
import com.guanyong.model.MaoyanMovieModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by mxk on 2017/9/28.
 */
@Service
public class MaoyanService {

    @Autowired
    IMaoyanHuaxiangDaoMapper iMaoyanHuaxiangDaoMapper;

    @Autowired
    IMaoyanMovieDaoMapper iMaoyanMovieDaoMapper;


    @Autowired
    IMaoyanMovieCelebrityMapper iMaoyanMovieCelebrityMapper;

    @Autowired
    IMaoyanMovieCompanyMapper iMaoyanMovieCompanyMapper;

    public MaoYanHuaXiangModel GetMaoYanhuaXiangByBaseId(Integer baseid,String date){
        return  iMaoyanHuaxiangDaoMapper.GetMaoyanHuaxiangModelBId(baseid,date);
    }


    public List<MaoyanMovieModel> GetMaoyanAllList(){
        return iMaoyanMovieDaoMapper.GetMaoyanMovieListAll();
    }


    public  MaoyanMovieModel GetMaoyanByMovieBaseId(Integer baseid){
        return iMaoyanMovieDaoMapper.GetMaoyanMovieBybaseid(baseid);
    }


    public  MaoyanMovieModel GetMaoyanByMovieMovieId(Integer movieid){
        return iMaoyanMovieDaoMapper.GetMaoyanMovieBymovieid(movieid);
    }

    public List<MaoyanCelebrityModel> GetMaoyanCelebrityList(Integer movieid){
        return  iMaoyanMovieCelebrityMapper.GetMaoyanMovieCelebrityListByMovieid(movieid);
    }


    public List<MaoyanCompanyModel> GetMaoyanCompanyList(Integer movieid){
        return  iMaoyanMovieCompanyMapper.GetMaoyanMovieCompanyListByMovieid(movieid);
    }
}
